<template>
    <input :value="message" @input="message = $event.target.value" />
    <button @click="handle"></button>
  </template>
  
  <script setup>
  import { ref } from 'vue';
  const message = ref('');
  
  const handle = () => {
    console.log(message.value);
    message.value = '';
  }
  </script>